#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<assert.h>
char* my_strncpy(char* destination, const char* source, size_t num)
{
	assert(destination && source);
	char* str = destination;
	while (*source&&num--)
	{
		*destination++ = *source++;
	}
	*destination = '\0';
	return str;
}
int main(void)
{
	char str1[20] = "Niko ";
	char str2[] = "Hi";
	printf("%s", my_strncpy(str1, str2, 10));
	return 0;
}